package edu.mju.util;

/**
 *  对获取的数据转换成Integer
 * @Author:wyp
 * @Date:2020/6/9 22:10
 */
public class RequestStrUtil {
    public static Integer getValue(String v,Integer defaultValue){
        if(v == null || "".equals(v)){
            return defaultValue;
        }else {
            int i = defaultValue;
            try {
                i =  Integer.parseInt(v);
            }catch (Exception e){
                System.out.println("RequestUtil的转型错误");
            }
            return i;
        }
    }
}
